<!DOCTYPE html>
<%include("inc/html.html"){};%>
    <title>${config.webname!'WE823 CMS'} - ${channel.name!'未知栏目'}</title>
    <%include("inc/css.html"){};%>
	<link rel="stylesheet" href="${ctx}/static/assets/lightbox/css/lightbox.css">
	</head>
    <body>
    <div class="container-fluid">
    	<header>
    		<%layout("inc/header.html",{isFirstPage:false}){};%>
    	</header>
    	<div class="container-fluid">
    		<div class="container">
    			<div class="col-md-2">
    				<%
    				var parentid = channel.parentId+"";
    				%>
    				<#cms_channel var="other_channel" id="${parentid}">
					<%if(other_channel!=null){%>
					<dl class="other-channels">
						<dt>${other_channel.name!'未知'}</dt>
						<%for(child in other_channel.childs!){%>
						<dd data-index="${child.id!0}"><a href="channel_${child.id!0}.jspx">${child.name!'未知'}</a></dd>
						<%}%>
					</dl>
					<%}%>
					</#cms_channel>
    			</div>
    			<div class="col-md-10">
	    			<section class="section-body" >
	    				<div class="section-title">${channel.name!'未知'}</div>
						<div class="section-detail">
							<%if(channel.type==0){%>
							<div class="channel-detail">${channel.content!'未知'}</div>

							<%}else if(channel.type==1){%>
							<%layout("channel_channels.html"){}%>
							
							<%}else if(channel.type==2){%>
							<%layout("channel_articles.html"){}%>
							
							<%}else if(channel.type==4){%>
							<%layout("channel_channels.html"){}%>
							<%layout("channel_articles.html"){}%>
							<%}%>
                      </div>
	    			</section>
				</div>
    		</div>
    	</div>
    	<footer>
    		<%layout("inc/footer.html"){};%>
    	</footer>
    </div>
	<%include("inc/js.html"){};%>
	<script src="${ctx}/static/assets/lightbox/js/lightbox-2.6.min.js"></script>
	<script src="${ctx}/static/skins/${theme}/js/main.js"></script>
	<script>
		$(document).ready(function(){
			var $dd = $(".other-channels dd");
			var current_id = "${channel.id!0}";
			if($dd!==undefined){
				$.each($dd,function(index,element){
					var data_index = $(element).attr("data-index");
					if(data_index===current_id){
						var $element = $(element);
						if(!$element.hasClass("active")){
							$element.addClass("active");
						}
					}
				});
			}
			
			$(".other-channels").pin({
				containerSelector:'.container',
				minWidth:940
			});

			CMS.LightBox.init(".section-detail .channel-detail img","lightbox");
		});
	</script>
    </body>
 </html>  